package com.nxmu.hire.mbg.commen;

import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.Field;

public class CustomCommentGenerator extends org.mybatis.generator.internal.DefaultCommentGenerator {

    @Override
    public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
        if(introspectedColumn.getRemarks() != null) {
            field.addJavaDocLine("/** " + introspectedColumn.getRemarks() + "*/");
        }
    }
}
